home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Nebula 2
/
Nebula Two.iso
/
SourceCode
/
Palettes
/
TablePrinter
/
DBTableViewPrinter.h
< prev
next >
Wrap
Text File
|
1995-06-12
|
3KB
|
115 lines
// DBTableViewPrinter -- An object for printing DBTableViews.
//
// By Eric T. Seymour, NeXT Computer, Inc.
//
// This object formats and prints DBTableViews. Basically, the drawself:
// method draws the table (in brute force fashion). It also contains methods
// for setting options.
//
// You may freely copy, distribute, and reuse the code in this example.
// NeXT disclaims any warranty of any kind, expressed or implied, as to its
// fitness for any particular use.
//
// This file looks best when using tabstops of 3.
#import <appkit/appkit.h>
#import <dbkit/dbkit.h>
@interface DBTableViewPrinter:View
{
BOOL isPrinting;
BOOL isPageNumbersEnabled;
BOOL isRowNumbersEnabled;
BOOL isSelectedRowsOnly;
BOOL isGridLinesOn;
BOOL isForceDrawColor;
id tableView;
id columnList;
id headerTextCell;
id pageNumberCell;
id rowNumberHeaderCell;
id rowNumberCell;
char pageNumSepChar;
char rowNumberHeaderTitle[51];
NXRect pageFrame;
NXRect theRect;
NXCoord rowHeight;
NXCoord pageHeight;
NXCoord pageAdvanceOffset;
NXCoord pageNumberHeight;
NXCoord rowNumberedWidth;
NXSize headerTextCellSize;
NXSize pageNumberCellSize;
NXSize rowNumberHeaderCellSize;
NXColor gridColor;
NXColor backgroundColor;
NXColor rowNumbersBackColor;
int maxColumns;
int maxRows;
int maxRowsPerPage;
int pagesPerRow;
int startingPageNumber;
int startingRowNumber;
}
// Force Drawing in Color toggle
- setForceDrawColor:(BOOL)toggle;
- (BOOL)isForceDrawColor;
// Page Numbering toggle
- setPageNumbersEnabled:(BOOL)toggle;
- (BOOL)isPageNumbersEnabled;
- setStartingPageNumber:(int)num;
- (int)startingPageNumber;
- setPageNumberSeparator:(char)ch;
- (char)pageNumberSeparator;
// Row Numbering toggle
- setRowNumbersEnabled:(BOOL)toggle;
- (BOOL)isRowNumbersEnabled;
- setStartingRowNumber:(int)num;
- (int)startingRowNumber;
- setRowNumbersTitle:(const char *)title;
- (const char *)rowNumbersTitle;
// Grid Lines toggle
- setGridLinesOn:(BOOL)toggle;
- (BOOL)isGridLinesOn;
// selectionState toggle
- setSelectedRowsOnly:(BOOL)toggle;
- (BOOL)isSelectedRowsOnly;
// Set Headers Bezeled Toggle
- setColumnHeadersBezeled:(BOOL)toggle;
- (BOOL)isColumnHeadersBezeled;
// Colors
- setColumnHeadersTextColor:(NXColor)color;
- (NXColor)columnHeadersTextColor;
- setColumnHeadersBackColor:(NXColor)color;
- (NXColor)columnHeadersBackColor;
- setRowNumbersTextColor:(NXColor)color;
- (NXColor)rowNumbersTextColor;
- setRowNumbersBackColor:(NXColor)color;
- (NXColor)rowNumbersBackColor;
- setGridLinesColor:(NXColor)color;
- (NXColor)gridLinesColor;
- setPageNumberColor:(NXColor)color;
- (NXColor)pageNumberColor;
- setBackgroundColor:(NXColor)color;
- (NXColor)backgroundColor;
// tableView set/get methods
- setTableView:table;
- tableView;
@end